package com.md.lession2;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Scanner;

public class Demo01 {

	public static void main(String[] args) {
		int []arr = new int[5];
		int i=0;
		
		Scanner scanner = new Scanner(System.in);
		System.out.println("请输入一个数：");
		
		for (; i < arr.length; i++) {
			System.out.print("第"+(i+1)+"个数:");
			arr[i] = scanner.nextInt();
		}
		Arrays.sort(arr);
		System.out.println("排序后结果：");
		for (i = 0; i < arr.length; i++) {
			System.out.println(arr[i]);
		}
	}

}
